/**min is a/num ,
 * most is between min to a ,
 * can set return max number*/
function MyRandom(num,a,max){
    var x1=Math.random()*num;
    var x2=Math.random()*num;
    var x=x1>x2?x1:x2;
    var y=a/x;
    return max>y?y:max;
}

/**
 * 
 * @param {number} max 
 * @returns {number} between 0 to max , can not return max,
 */
function RamdonNext(max){
    return Math.floor(Math.random()*max);
}


function ArrayGetRamdon(o){
    if(o instanceof Array){
        return o[RamdonNext(o.length)];
    }
}